#include "SMPPDataSMResp.hpp"

using namespace smpp::pdu;

DataSMResp::DataSMResp(const Header &nHeader,
const CoctetString &nMessageId,
const MessageSubmissionResponseTLVs &nMessageSubmissionResponseTLVs):
Header(nHeader),
_MessageId(nMessageId),
MessageSubmissionResponseTLVs(nMessageSubmissionResponseTLVs){}

DataSMResp::DataSMResp(const DataSMResp &nDataSMResp):
Header(nDataSMResp),
_MessageId(nDataSMResp.getMessageId()),
MessageSubmissionResponseTLVs(nDataSMResp){}

void DataSMResp::setMessageId(const CoctetString &sMessageId){
	_MessageId = sMessageId;
}

const CoctetString &DataSMResp::getMessageId() const{
	return _MessageId;
}

void DataSMResp::calcCommandLength(){
	_CommandLength = 16 + _MessageId.size() +
		MessageSubmissionResponseTLVs::getLength();
}
